#!/bin/bash

DIR="/media/hop-siup/wallpapers/show"

export DISPLAY=:0.0
export `grep ^DBUS_SESSION_BUS_ADDRESS /home/piotrek/.dbus/session-bus/$(dbus-uuidgen --get)-$(echo $DISPLAY | sed -e 's/\([^:]*:\)//g' -e 's/\..*$//g')`


PIC=`find ${DIR} -type f \( -iname "*.jpg" -or -iname "*.JPG" \) | shuf -n1`
gconftool -t string -s /desktop/gnome/background/picture_filename "${PIC}"

